﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace A2DFramework.ValidationService
{
    /// <summary>
    /// 支持规则场景的验证基类
    /// </summary>
    public class RuleValidationAttribute : ValidationAttribute
    {
        public RuleValidationAttribute()
        {
            this.RuleName = string.Empty;
        }

        public RuleValidationAttribute(string rule)
        {
            this.RuleName = rule;
        }

        public string RuleName { get; set; }

        protected override ValidationResult IsValid(object value, ValidationContext validationContext)
        {
            return base.IsValid(value, validationContext);
        }
    }
}
